{% extends 'wancake/../wanba.general/base_frame.html' %}
{% block body %}
  <nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
      <div class="navbar-header">
        <a class="navbar-brand" href="{{ hrefs.index }}">玩吧报表平台</a>
        <p class="navbar-text navbar-right"><a class="navbar-link" id="wb-logout-btn" href="{{ hrefs.logout }}">退出</a></p>
      </div>
    </div>
  </nav>
  <div class="container-fluid">
    <div class="row">
      <div class="col-sm-3 col-md-2 wb-sidebar">
        <ul class="nav wb-nav-sidebar">
{#          <li><a href="/wms/cake/productdetails">产品详情</a></li>#}
{#          <li><a href="/wms/cake/orderrecord">订购记录</a></li>#}
{#          <li><a href="/wms/cake/weixin">微信统计</a></li>#}
{#          <li><a href="/wms/cake/resmng">资源管理</a></li>#}
{#          <li><a href="/wms/cake/epgsyncer">同步数据</a></li>#}
          {% for nav_item in hrefs.nav %}
            <li><a href="{{ nav_item.href }}">{{ nav_item.name }}</a></li>
          {% endfor %}
        </ul>
      </div>
      <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 wb-content">
        {% block content %}{% endblock %}
      </div>
    </div>
  </div>
  <script type="text/javascript">
  $(document).ready(function(e) {
    $("#wb-logout-btn").click(function(e) {
      var url = "{{ hrefs.logout }}";
      $.ajax(url, {
        type: "GET",
        dataType: "json",
        success: function(data) {
          if (data.resultCode == 1) {
            window.location.href = "/wms/cake/auth/login";
          }
        },
        error: function() {
        }
      });
      return false;
    });
  });
  </script>

{% endblock %}